<form nz-form [formGroup]="form" (ngSubmit)="submit()" role="form">
    <nz-tabset [nzAnimated]="false" class="tabs" (nzSelectChange)="switch($event)">
        <nz-tab nzTitle="账户密码登录">
            <nz-alert *ngIf="error" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg"></nz-alert>
            <!--账号-->
            <nz-form-item>
                <nz-form-control>
                    <nz-input-group nzSize="large" nzPrefixIcon="anticon anticon-user">
                        <input nz-input formControlName="userName" placeholder="账号">
                    </nz-input-group>
                    <nz-form-explain *ngIf="userName.dirty && userName.errors">
                        请输入账户名！
                    </nz-form-explain>
                </nz-form-control>
            </nz-form-item>
            <!--密码-->
            <nz-form-item>
                <nz-form-control>
                    <nz-input-group nzSize="large" nzPrefixIcon="anticon anticon-lock" [nzAddOnAfter]="controlPwd">
                        <input nz-input [type]="passwordType" formControlName="password" placeholder="密码">
                    </nz-input-group>
                    <ng-template #controlPwd>
                    <i class="fa fa-eye-slash point" [hidden]="passwordType=='text'" (click)="passwordType='text'"></i>
                    <i class="fa fa-eye point" [hidden]="passwordType=='password'" (click)="passwordType='password'"></i>
                    </ng-template>
                    <nz-form-explain *ngIf="password.dirty && password.errors">
                        请输入密码！
                    </nz-form-explain>
                </nz-form-control>
            </nz-form-item>
            <!--图形验证码-->
            <nz-form-item *ngIf="useVerifyCode">
                <nz-form-control>
                    <nz-input-group nzSize="large">
                        <input nz-input type="text" [maxLength]="10" formControlName="verifyCode" placeholder="验证码">
                        <img [src]="verifyCodeUrl" alt="验证码" (click)="changeVerifyCode()"
                             style="position: absolute;z-index: 9;right: 1px;top: 1px;">
                    </nz-input-group>
                </nz-form-control>
            </nz-form-item>
        </nz-tab>
    </nz-tabset>
    <nz-form-item>
        <nz-col [nzSpan]="12" class="text-left">
            <a *ngIf="registerPage" class="forgot" [href]="registerPage">注册</a>
        </nz-col>
        <nz-col [nzSpan]="12" class="text-right">
            <a class="forgot" (click)="msg.error('请联系管理员')">忘记密码？</a>
        </nz-col>
    </nz-form-item>

    <nz-form-item>
        <button nz-button type="submit" nzType="primary" nzSize="large" [nzLoading]="loading"
                style="display:block;width: 100%;">登录
        </button>
    </nz-form-item>
</form>
<!--<div class="other">-->
<!--其他登录方式-->
<!--&lt;!&ndash;<i title="in fact Auth0 via window" (click)="open('auth0', 'window')" nz-icon type="alipay-circle" class="icon"></i>&ndash;&gt;-->
<!--&lt;!&ndash;<i title="in fact Github via redirect" (click)="open('taobao')" nz-icon type="taobao-circle" class="icon"></i>&ndash;&gt;-->
<!--&lt;!&ndash;<i title="真的是微博" (click)="open('weibo', 'window')" nz-icon type="weibo-circle" class="icon"></i>&ndash;&gt;-->
<!--<a class="register" routerLink="/passport/register">注册账户</a>-->
<!--</div>-->
